load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "config",
    srcs = [
        "config.go",
        "constants.go",
    ],
    importpath = "github.com/bazelbuild/bazel-gazelle/config",
    visibility = ["//visibility:public"],
    deps = [
        "//internal/module",
        "//internal/wspace",
        "//rule",
    ],
)

go_test(
    name = "config_test",
    srcs = ["config_test.go"],
    embed = [":config"],
    deps = ["//rule"],
)

filegroup(
    name = "all_files",
    testonly = True,
    srcs = [
        "BUILD.bazel",
        "config.go",
        "config_test.go",
        "constants.go",
    ],
    visibility = ["//visibility:public"],
)

alias(
    name = "go_default_library",
    actual = ":config",
    visibility = ["//visibility:public"],
)
